package com.doubi.alipay;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class AlipayConfig {
    // APPID
    public static String app_id = "";
    // 生成公钥时对应的私钥
    public static String private_key = "";
    // 应用公钥
    public static String public_key = "";
    //支付宝公钥
    public static String alipay_public_key = "";
    //异步回调接口:得放到服务器上，且使用域名解析 IP
    public static String notify_url = "";

    @Value("${alipay.notifyUrl}")
    public void setNotify_url(String notify_url) {
        AlipayConfig.notify_url = notify_url;
    }

    /*以下不用修改*/
    //支付宝网关（注意沙箱alipaydev，正式则为 alipay）不需要修改
    public static String url = "https://openapi.alipay.com/gateway.do";
    //编码类型
    public static String charset = "UTF-8";
    //数据类型
    public static String format = "json";
    //签名类型
    public static String signtype = "RSA2";
}
